package com.hdrx.fundhelper.controller;

import com.hdrx.fundhelper.common.R;
import com.hdrx.fundhelper.dao.pojo.FundInfo;
import com.hdrx.fundhelper.service.fund.FundInfoService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: houdx
 * @description:
 * @date: 2023/6/15 11:12
 */
@RestController
@RequestMapping("/fundinfo")
@Api(tags = "基金信息")
public class FundInfoController {

    @Resource
    private FundInfoService fundInfoService;


    @PostMapping("/addFundInfo")
    public R addFundInfo(@RequestBody FundInfo fundInfo){
        fundInfoService.addFundInfo(fundInfo);
        return R.ok();
    }
    @GetMapping("/queryFundInfo")
    public List<FundInfo> queryFundInfo(){
        return fundInfoService.queryFundInfo();
    }
}
